 <div class="pageheader">
      <h2><i class="fa fa-home"></i> Teachers </h2>
    </div>
    
    <div class="contentpanel">
       
      <div class="panel panel-default">
        <div class="panel-body">
		<div class="clearfix mb30"></div>
          <div class="table-responsive">
          <table class="table" id="table2">
              <thead>
                 <tr>
                    <th>Student Name</th>
                    <th>Added</th>
                 </tr>
              </thead>
              <tbody>
			  <?php $teachers = $this->db->get_where('users',array('type'=>'student'))->result_array();
			  foreach ( $teachers as  $teacher ) {
			  ?>
                 <tr class="gradeU">
                    <td><?php echo  $teacher["username"]?></td>
                    <td><?php echo  $teacher["added"]?></td>
                 </tr>
			  <?php } ?>
              </tbody>
           </table>
          </div><!-- table-responsive -->
          
        </div><!-- panel-body -->
      </div><!-- panel -->
        
    </div><!-- contentpanel -->
    
  </div><!-- mainpanel -->
 
  
</section>


<script src="<?php echo base_url();?>adm/js/jquery-1.10.2.min.js"></script>
<script src="<?php echo base_url();?>adm/js/jquery-migrate-1.2.1.min.js"></script>
<script src="<?php echo base_url();?>adm/js/bootstrap.min.js"></script>
<script src="<?php echo base_url();?>adm/js/modernizr.min.js"></script>
<script src="<?php echo base_url();?>adm/js/jquery.sparkline.min.js"></script>
<script src="<?php echo base_url();?>adm/js/toggles.min.js"></script>
<script src="<?php echo base_url();?>adm/js/jquery.cookie.js"></script>
<script src="<?php echo base_url();?>adm/js/jquery.datatables.min.js"></script>
<script src="<?php echo base_url();?>adm/js/select2.min.js"></script>
<script src="<?php echo base_url();?>adm/js/custom.js"></script>
<script>
  jQuery(document).ready(function() {
    
    jQuery('#table1').dataTable();
    
    jQuery('#table2').dataTable({
      "sPaginationType": "full_numbers"
    });
    
    // Chosen Select
    jQuery("select").select2();
    
    // Delete row in a table
    jQuery('.delete-row').click(function(){
      var c = confirm("Continue delete?");
      if(c)
        jQuery(this).closest('tr').fadeOut(function(){
          jQuery(this).remove();
        });
        
        return false;
    });
    
    // Show aciton upon row hover
    jQuery('.table-hidaction tbody tr').hover(function(){
      jQuery(this).find('.table-action-hide a').animate({opacity: 1});
    },function(){
      jQuery(this).find('.table-action-hide a').animate({opacity: 0});
    });
  
  
  });
</script>

</body>
</html>
